Daniel van Vugt [Thu, 23 Jan 2020 07:36:39 +0000 (15:36 +0800)]
overviewControls: Use ClutterActor's translation-x
Instead of reimplementing `translation-x` as a relayout. It still looks
the same but no longer incurs relayouts during the animation which
reduces render time significantly.
Related to: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1271
Jonas Dreßler [Mon, 9 Dec 2019 18:16:41 +0000 (19:16 +0100)]
status/system: Update text of orientation lock menu entry
Since the orientation lock menu entry is a proper menu entry instead of
a icon-only button now, we also show a description-text for that entry,
so update this text depending on whether orientation is locked or not to
better reflect what clicking the menu entry will do.
Jonas Dreßler [Mon, 27 Jan 2020 17:46:17 +0000 (18:46 +0100)]
shellMountDialog: Close all dialogs when pressing Escape key
Since we don't really know what the buttons we're adding to the dialogs
are about, we can't configure a button to "be clicked" when the escape
key is pressed. So add a separate escape key handler to fix that, return
-1 and abort the request.
Jonas Dreßler [Mon, 27 Jan 2020 17:43:40 +0000 (18:43 +0100)]
shellMountDialog: Check for changes before creating new buttons
When updating the buttons of the mount dialogs, compare the new buttons
to the old ones and only create new buttons in case something changed.
This makes sure key focus isn't reset or lost unnecessarily while a
dialog is opened.
Jonas Dreßler [Mon, 27 Jan 2020 17:50:26 +0000 (18:50 +0100)]
shellMountDialog: Switch to new ListLayout for processes dialog
Since there is a generic layout for dialogs like that now, use it. Also
remove the functionality of focussing a window when clicking a list
item, it's not discoverable at all and pretty unexpected.
Jonas Dreßler [Mon, 27 Jan 2020 21:19:31 +0000 (22:19 +0100)]
kbdA11yDialog: Remove styleClass argument from DialogContent params
The MessageDialogContent class does not have a styleClass param, also
using the "access-dialog" css class doesn't make sense for this dialog,
so just remove that param.
Olivier Fourdan [Tue, 21 Jan 2020 10:05:58 +0000 (11:05 +0100)]
perf-tool: Allow to run as a Wayland compositor
`gnome-shell-perf-tool` is initially designed to run on X11, using the
`--replace` option which does not work when gnome-shell is a Wayland
compositor.
A solution would be to run `gnome-shell-perf-tool` in place of just
`gnome-shell` to run the entire perf session under Wayland, but the
script `gnome-shell-perf-tool` does not spawn `gnome-shell` as a Wayladn
compositor, so that fails as well.
Add a `--wayland` option to `gnome-shell-perf-tool` so that it can
optionally spawn gnome-shell as a Wayland compositor so the whole perf
tool can be starred from a console with:
Olivier Fourdan [Fri, 24 Jan 2020 09:59:31 +0000 (10:59 +0100)]
perf-tool: Spawn perf-tool-helper from gnome-shell
On Wayland, the display server is the Wayland compositor, i.e.
`gnome-shell` itself.
As a result, we cannot spawn `gnome-shell-perf-helper` before
`gnome-shell` is started, as `gnome-shell-perf-helper` needs to connect
to the display server.
So, instead of spawning `gnome-shell-perf-helper` from the perf tool,
start it from `gnome-shell` itself.
Björn Daase [Fri, 24 Jan 2020 18:01:45 +0000 (18:01 +0000)]
Revert "recorder: Switch to vp9"
This reverts commit d183f13456991d12ea57ad14ba38a1f7407d0037.
Switching to the vp9 encoder seemed like a good idea at the time but
unfortunately it also has the major drawback, that it leaks a serious
amount of memory every time it is used. See
https://gitlab.gnome.org/GNOME/gnome-shell/issues/256#note_692743
for more details.
Florian Müllner [Thu, 23 Jan 2020 16:15:08 +0000 (17:15 +0100)]
app: Use better icon for wayland window-backed apps
For window-backed apps (read: windows we can't match to a .desktop
file), we use the window's icon property as icon. However there is
no such property on wayland (at least in the protocols we support),
so we end up with a blank actor in that case.
Do better than that, and pick a generic fallback icon instead.
Jonas Dreßler [Thu, 23 Jan 2020 18:09:50 +0000 (19:09 +0100)]
st/entry: Notify "text" prop on every change in the ClutterText
Notifying the "text" property inside `st_entry_set_text()` misses all
the text changes done by ClutterText itself, including those that happen
on key-presses. Fix that by notifying that property inside the
"notify::text" handler connected to the ClutterText.
Jonas Dreßler [Tue, 21 Jan 2020 18:31:53 +0000 (19:31 +0100)]
theme/entries: Adjust style of entries according to mockups
Add some more padding for the actual text inside the entry and add some
clearance between the left border of the text (where the cursor is) and
the hint-text.
Jonas Dreßler [Wed, 22 Jan 2020 19:53:34 +0000 (20:53 +0100)]
st/entry: Show hint actor while entry is focused
Also show the hint actor of an StEntry while the entry is focused but
has no text inside it. This is part of the new dialog and lock-screen
design where there are no labels before entries anymore and labels are
instead shown as a hint-text of the entry.
Sebastian Keller [Wed, 22 Jan 2020 22:34:23 +0000 (23:34 +0100)]
st/icon: Fix GIcon leak in set_fallback_icon_name
set_fallback_icon_name() leaks a GIcon by using the set_icon method
which adds a ref to the GIcon without removing its own ref after calling
the method.
Related to https://gitlab.gnome.org/GNOME/gnome-shell/issues/2146
Florian Müllner [Fri, 17 Jan 2020 16:26:08 +0000 (17:26 +0100)]
dateMenu: Indicate when do-not-disturb is on
When do-not-disturb is enabled, non-critical notifications will not
be shown as banners. It therefore makes sense to indicate that state
to the user, so they don't accidentally miss notifications.
Florian Müllner [Tue, 21 Jan 2020 15:36:56 +0000 (16:36 +0100)]
dateMenu: Bind pad visibility to indicator
Currently the indicator pad requests a size of 0x0 if the corresponding
indicator is hidden. Right now this is enough to balance out the indicator,
but it won't be when we add spacing to the parent container.
Properly hide the pad with the indicator to avoid that issue.
Florian Müllner [Fri, 4 May 2018 15:55:29 +0000 (17:55 +0200)]
calendar: Add "Do Not Disturb" switch
We've had the ability to temporarily disable notification banners
all the way back to 3.0, but we stopped exposing it in the UI with
the 3.16 notification redesign. With the message list being more
concise nowadays and the "Clear" button reduced to a single icon,
we now have space for a "Do Not Disturb" switch again.
Carlos Garnacho [Tue, 21 Jan 2020 16:01:56 +0000 (17:01 +0100)]
keyboard: Avoid blank space in OSK panel on portrait layouts
We try to make the OSK 1/3rd as big as the monitor. On landscape
layouts we usually get away with it as there's plenty of horizontal
space to enlarge the OSK while keeping the OSK aspect ratio.
In portrait layout, the horizontal space is a lot more scarce so
it means we'll still have plenty of space after making the OSK as
wide as it can possibly be, which will look as odd blank space in
the OSK panel.
In order to fix this, let the OSK panel height be less than 1/3rd
the monitor size if we are dealing with portrait layouts.
Carlos Garnacho [Tue, 21 Jan 2020 15:35:07 +0000 (16:35 +0100)]
keyboard: Do not reset to initial page on unmap
It will happen before next map anyway, and most notably at times
actor sizes produce correct results.
Fixes oddities in emoji pager visibility after showing the emoji
panel, moving to another page, and hiding the OSK with the downward
arrow button. The next time the emoji panel would be shown, panels
had a chance to remain invisible.
Carlos Garnacho [Tue, 21 Jan 2020 15:33:28 +0000 (16:33 +0100)]
keyboard: Do not set the initial page on construction
It is already scheduled to be set on first map. Doing so here triggers
size and theme node checks the actor tree is not ready for, as the
toplevel actor is not yet attached to the stage.
This functionality always suffered from discoveribility
problems, and now that the folder dialog can rename the
app folders, there's just no reason to keep it.
Make the AppFolderPopup behave much more like a dialog than a
popup itself. To do that, remove the BoxPointer and replace it
by a StBoxLayout. The dialog is is also bind-constrained to the
view selector.
St has the regular abstractions to handle actors that are bigger
than their parent could handle: StScrollable, StScrollView, and
StAdjustment.
However, the only StScrollable implementation available currently
is StBoxLayout, which forces a ClutterBoxLayout as the layout
manager (and relies on it not being unset).
Introduce StViewport, which is a minimal StScrollable implementation
that doesn't rely on any specific layout manager.
Jonas Dreßler [Fri, 17 Jan 2020 13:05:49 +0000 (14:05 +0100)]
dialog: Add a ListSection and ListSectionItem
According to the mockups, add a generic ListSection and ListSectionItem
for dialogs. To add items (like a ListSectionItem) to a section,
ListSection exposes a public ListSection.list actor.
See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
Jonas Dreßler [Sun, 19 Jan 2020 17:01:57 +0000 (18:01 +0100)]
lightbox: Change vignette brightness to 0.5
Since the overview search results now have a dark background layer, we
can brighten the background image a bit again. As a factor we use 0.5,
since that ensures the texts in the IconGrid are still readable and the
background image is visible, too.
Andre Klapper [Sat, 18 Jan 2020 13:04:16 +0000 (14:04 +0100)]
Remove two line breaks to make comments for translators get displayed
A comment for translators must *immediately* precede a message:
https://wiki.gnome.org/TranslationProject/DevGuidelines/Use%20comments
These two comments were previously not displayed in any po files.
Jonas Dreßler [Sun, 6 May 2018 15:17:33 +0000 (17:17 +0200)]
altTab: Don't return from _init() if there are no windows/apps
If a new SwitcherPopup is created and there are no windows or apps to
switch through found, instead of returning from _init(), still
initialize the SwitcherPopup and let the check in SwitcherPopup.show()
return false to terminate the popup.
In both cases, with or without the return statements,
WindowManager._startSwitcher() will call SwicherPopup.destroy(), which
will try to disconnect signal handlers, destroy actors etc. Now if the
constructor can't finish creating the popup, some of the functions
called from _onDestroy() will fail and throw errors.
One of those cases is when window-switcher is limited to the current
workspace, and a WindowCyclerPopup is initiated on an empty workspace.
Because this._highlight hasn't been created, _onDestroy() will fail when
trying to destroy the actor of this._highlight.
Also, the actor of this._switcherList will not get destroyed in case
show() returns because this._items is empty. For example, this will
happen when a new AppSwitcherPopup is initialized with at least 1
running app, but 0 windows on the active workspace.
Jonas Dreßler [Sat, 5 May 2018 13:32:16 +0000 (15:32 +0200)]
altTab: Rename List* classes to Switcher*
Calling those classes ThumbnailSwitcher and WindowSwitcher makes more
sense since we are using this naming scheme for all classes extending
SwitcherPopup.SwitcherList.
nana-4 [Fri, 17 Jan 2020 10:57:42 +0000 (19:57 +0900)]
theme: Regain focus ring in %bubble_button
Instead of removing all button shadows forcibly with
`box-shadow: none !important`, remove only the drop shadows selectively
with button(). This allows %bubble_button to preserve the focus ring
while eliminating the drop shadows.
nana-4 [Tue, 14 Jan 2020 18:09:03 +0000 (03:09 +0900)]
theme: Improve button styling
- Move the more generic %button style before %bubble_button to reduce
ugly overrides.
- Remove sizing factors from _drawing.scss to reduce ugly !importants.
- Make the %bubble_button style more consistent.
- Add missing focus styling to %notification_bubble.
nana-4 [Sun, 12 Jan 2020 07:22:59 +0000 (16:22 +0900)]
theme: Remove invalid button styling
There is no ".message-list-clear-button .button" selector, but
".message-list-clear-button.button". To make it clear, this commit adds
.button to .message-list-clear-button.
Jonas Dreßler [Sun, 8 Dec 2019 20:56:46 +0000 (21:56 +0100)]
shellEntry: Show popup menu at cursor position when pressing menu key
When pressing the menu key to show the popupMenu inside a ShellEntry,
the menu is currently aligned with the end of the entered text, this
causes a bug in case the text is overflowing the width of the entry: The
menu will be shown outside of the entry field, because it's aligned with
the (invisible) end of the text.
Fix that by simply aligning the popup menu with the cursor of the entry,
which is a behavior that makes sense when pressing the menu-key anyway.
Jonas Dreßler [Mon, 13 Jan 2020 14:13:53 +0000 (15:13 +0100)]
dialog: Update the layout of dialogs according to the new design
According to the new dialog mockups, update the dialogs paddings and
spacings. Also change the font-weigth of the title to 800 and the
font-size to 18pt, this will make the headings of some dialogs ellipsize
because they contain too much text, we'll have to fix this in subsequent
commits.
See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343